import request from '@/utils/request'

// 查询商品兑换记录列表
export function listVouchers(query) {
    return request({
        url: '/integral/vouchers/list',
        method: 'get',
        params: query
    })
}

// 查询商品兑换记录详细
export function getVouchers(voucherId) {
    return request({
        url: '/integral/vouchers/' + voucherId,
        method: 'get'
    })
}

// 新增商品兑换记录
export function addVouchers(data) {
    return request({
        url: '/integral/vouchers',
        method: 'post',
        data: data
    })
}

// 修改商品兑换记录
export function updateVouchers(data) {
    return request({
        url: '/integral/vouchers',
        method: 'put',
        data: data
    })
}

// 删除商品兑换记录
export function delVouchers(voucherId) {
    return request({
        url: '/integral/vouchers/' + voucherId,
        method: 'delete'
    })
}
